package cn.wtg.kotlindemo

import android.app.Application
import android.content.Context
import cn.wtg.kotlinlib.net.base.RetrofitManager

/**
 * author: wtg
 * time: 2022/12/17
 * desc:
 */
class MyApplication : Application() {
    var instance: Application? = null

    override fun attachBaseContext(base: Context?) {
        super.attachBaseContext(base)
        instance = this
    }

    override fun onCreate() {
        super.onCreate()
        initConfig()
    }

    /**
     * 初始化配置
     */
    private fun initConfig(){
        //http://www.weather.com.cn/data/sk/101010100.html
        RetrofitManager.getInstance()?.setBaseUrl("https://czl.luyuan.cn:18443/intelligence/")?.init(instance)
    }
}